#!/bin/bash
 
# 设置包目录
PACKAGES_DIR="./packages"
 
# 进入包目录
cd "$PACKAGES_DIR" || exit
 
# 遍历所有包并发布它们
for package in */; do
  echo "正在发布：$package"
  (
    cd "$package" || exit
    npm publish
  )
done
 
echo "所有包已发布完毕。"